<!--<?php
include_once PrintEot('header');
if($action=="affiliate"){
	$db_gender = $cfg_gender[$db_affiliate[gender]];
	$db_biztype = $cfg_affbiztype[$db_affiliate[biz_type]];
	$db_certtype = $cfg_affcerttype[$db_affiliate[cert_type]];
	$cdate = date('Y/m/d H:i:s',$db_affiliate[create_time]);	
	$db_status = $cfg_userstatus[$db_affiliate[status]];	
print <<<EOT
-->
<form action="$admin_file" method="get" name="form">
<center>
<TABLE cellSpacing="0" cellPadding="0" width="100%" border=0 ID="Table22">
	<TBODY>
		<TR>
			<TD align=left class="tittab" BACKGROUND="$imgpath/admin/menu_bg.gif"><strong><img src="$imgpath/admin/view.gif" width="15" height="13" align="absmiddle"> 站长详细资料</strong></TD>
		</TR>
	</TBODY>
</TABLE>
<br/>
						<table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
							<tr>
								<td bgcolor="#f6f6f6">登录名：<span class="hong12"><strong>$db_affiliate[login_name]</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									注册时间：<span class="hong12"><strong>$cdate</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									状态：<span class="hong12"><strong>$db_status</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									</td>

							 <td align=right bgcolor="#f6f6f6">
							 <a href="$backurl">返回上一页</a>&nbsp;
						 </td>   
							</tr>
						</table>


<table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
				<tr>
					<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#d0d0d0">
							<tr>
								<td align="center" bgcolor="#ffffff">
								    <table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr><td height="10"></td></tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="4">										
										<tr>
											<td height="25" align="right" width="15%"><nobr>姓名：</nobr></td>
											<td align="left">&nbsp;$db_affiliate[linkman]($db_gender)</td>
											<td height="25" align="right" class="hei12b">用户类型：</td>
											<td width="45%">&nbsp;$db_biztype</td>										
										</tr>
										<tr>
											<td height="25" align="right" class="hei12b">营业执照：</td>
											<td align="left">&nbsp;$db_affiliate[biz_code]</td>																			
											<td height="25" align="right" >信誉度：</td>
											<td align="left">&nbsp;$db_affiliate[credit]</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td align="center" bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="4">
									    <tr>
											<td  height="25" align="right" width="15%"><nobr>证件类型：</nobr></td>
											<td align="left">&nbsp;$db_certtype</td>
											<td height="25" align="right" class="hei12b">证件号码：</td>
											<td width="45%">&nbsp;$db_affiliate[cert_code]</td>
										</tr>
										<tr>
											<td height="25" align="right" class="hei12b">手机号码：</td>
											<td>&nbsp;$db_affiliate[mobile]</td>
										
											<td height="31" align="right" class="hei12b">电子邮件：</td>
											<td>&nbsp;$db_affiliate[email]</td>
										</tr>
										<tr>
											<td height="31" align="right" class="hei12b">MSN：</td>
										<td>&nbsp;$db_affiliate[msn]</td>
										
											<td height="31" align="right" class="hei12b">QQ号码：</td>
											<td>&nbsp;$db_affiliate[qq]</td>
										</tr>
										<tr>
											<td height="31" align="right" class="hei12b">办公电话：</td>
											<td>&nbsp;$db_affiliate[telephone]-$db_affiliate[ext]</td>
										
											<td height="25" align="right" class="hei12b">省市地区：</td>
											<td>&nbsp;$db_affiliate[province_name]-$db_affiliate[city_name]</td>
										</tr>							
										<tr>
											<td  height="25" align="right" class="hei12b">邮政编码：</td>
											<td  align="left">&nbsp;$db_affiliate[zip]</td>
										
											<td align="right" class="hei12b">联系地址：</td>
											<td align="left" >&nbsp;$db_affiliate[address]</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="4">
										<tr>
											<td height="10"></td>
										</tr>
										<tr>
											<td height="25" align="right" width="15%"><nobr>总收入：</nobr></td>
											<td >&nbsp;$db_affiliate[total_money]</td>
										
											<td height="25" align="right">余额：</td>
											<td width=45%>&nbsp;$db_affiliate[balance]</td>
										</tr>
										<tr>
											<td height="10"></td>
										</tr>										
									</table>
								</td>
							</tr>
							<tr>
								<td align="center" bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="4">
										<tr>
											<td width="15%" align="right" valign="top">备注说明：</td>
											<td align="left">&nbsp;$db_affiliate[memo]</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td>&nbsp;</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
					<td width="45%" valign="top">
							<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#d0d0d0">
								 <tr><td bgcolor="#f6f6f6" height="25" colspan="4">
								 <table width="100%" border="0" cellpadding="0" cellspacing="0">
								 <tr><td><b>支付信息</b></td>
								 <td align=right>
<!--
EOT;
	if($canadd==true){
		showButton(1,'新增','javascript:showModelWin("'.$admin_file.'&action=newpayinfo&aff_id='.$curid.$transtr.'");');
	}
print <<<EOT
-->
								 &nbsp;</td>
								 </tr>
								 </table>
								  </td></tr>
								<tr>
									<td height="25" align="center" bgcolor="#ffffff" class="hei12b"><nobr>开户银行</nobr></td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>开户名称</td>
									<td width="25%" align="center" bgcolor="#ffffff" class="hei12b"><nobr>银行帐号</td>	
									<td width="60px" align="center" bgcolor="#ffffff" class="hei12b"><nobr>操作</td>								
								</tr>
<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_affpayinfolist); 
foreach($db_affpayinfolist as $db_affpayinfo ){
		$curidx = $curidx+1;
		$curpageidx = $curpageidx+1;
		$cdate = date('Y/m/d H:i:s',$db_affpayinfo[create_time]);
		$selid = $db_affpayinfo[id];
print <<<EOT
-->      
										<tr>
											<td height="25" align="center" bgcolor="#ffffff">$db_affpayinfo[open_name]</td>
											<td bgcolor="#ffffff" align="center"><nobr>$db_affpayinfo[acc_contract]</nobr></td>
											<td bgcolor="#ffffff" align="center" class="lanh12"><nobr>$db_affpayinfo[account]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>
<a href="javascript:showModelWin('$admin_file&action=editpayinfo&aff_id=$curid&curid=$selid$transtr');"><img src="$imgpath/admin/view.gif" border="0"/></a>
&nbsp;
<!--
EOT;
	showDelButton($db_affpayinfo[id],'delpayinfo');
print <<<EOT
-->
											</nobr>
											</td>
											
										</tr>
<!--
EOT;
}print <<<EOT
-->
							</table>
							<br/>							
							<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#d0d0d0">
								 <tr><td bgcolor="#f6f6f6" height="25" colspan="5">
								 <table width="100%" border="0" cellpadding="0" cellspacing="0">
								 <tr><td><b>审批记录</b></td>
								 <td align=right>&nbsp;</td>
								 </tr>
								 </table>
						</td>
								</tr>
								<tr>
									<td align="center" bgcolor="#ffffff" class="hei12b" height="25px"><nobr>序号</nobr></td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核人</td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核时间</td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>说明</td>		
									<td width="60px" align="center" bgcolor="#ffffff" class="hei12b"><nobr>结果</td>								
								</tr>	
<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_auditlist); 
foreach($db_auditlist as $db_audit ){
		$curidx = $curidx+1;
		$curpageidx = $curpageidx+1;
		$cdate = date('m/d H:i',$db_audit[create_time]);
		$status = $cfg_userstatus[$db_audit[auditstatus]];
print <<<EOT
-->      
										<tr>
											<td height="25" align="center" bgcolor="#ffffff">$curidx</td>										
											<td height="25" align="center" bgcolor="#ffffff"><nobr>$db_audit[audit_name]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$cdate</nobr></td>
											<td bgcolor="#ffffff" align="center" class="lanh12"><nobr>$db_audit[content]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$status</nobr></td>
										</tr>
<!--
EOT;
}print <<<EOT
-->															  
						 	</table>	
					</td>
				</tr>
			</table>
</center>
</form>

<script language=javascript>
function ConfirmChange(url,msg){	
	if(confirm(msg)){
		window.location = url;
	}
}
</script>

<!--
EOT;
}else if($action=="newpayinfo" || $action=="editpayinfo"){
print <<<EOT
-->
<form name="form" method="post" action="$basename" id="form" onsubmit="return checkfrm();" >
<input type="hidden" name="job" id="job" value="$job" />
<input type="hidden" name="aff_id" id="aff_id" value="$aff_id" />
<input type="hidden" name="curid" id="curid" value="$curid" />
<input type="hidden" name="action" id="action" value="savepayinfo" />
<TABLE cellSpacing="0" cellPadding="0" width="100%" border=0 ID="Table22">
	<TBODY>
		<TR >
			<TD class="tittab" BACKGROUND="$imgpath/admin/menu_bg.gif"><strong><img src="$imgpath/admin/view.gif" width="15" height="13" align="absmiddle"> 新增/编辑　支付信息</strong></TD>
		</TR>
	</TBODY>
</TABLE>
<table cellspacing=0 cellpadding=0 width="100%" border=0 id="Table23">  
    <tbody>
      <tr>
        <td valign=top>
		<div class="addpro">
		<table cellspacing=0 cellpadding=4 width="100%" border=0 align=center id="Table24">
        <tbody>
				<tr>
					<td align=right width="30%">支付方式(<font color=red>*</font>)：</td>
					<td>
					<select name="pay_method" id="pay_method" style="WIDTH: 261px" ><option value="">请选择...</option>$op_paymethodlist</select>
					</td>
				</tr>
				<tr>
					<td align=right>开户帐号(<font color=red>*</font>)：</td>
					<td><input name="account" type="text" id="account" style="WIDTH: 261px"  value="$db_payinfo[account]"/></td>
				</tr>
				<tr>
					<td align=right>开户人姓名(<font color=red>*</font>)：</td>
					<td><input name="acc_contract" type="text" id="acc_contract" style="WIDTH: 261px"  value="$db_payinfo[acc_contract]"/></td>
				</tr>
				<tr>
					<td align=right>开户名称：</td>
					<td><input name="open_name" type="text" id="open_name" style="WIDTH: 261px"  value="$db_payinfo[open_name]"/></td>
				</tr>
				<tr>
					<td align=right>开户地址：</td>
					<td><input name="open_address" type="text" id="open_address" style="WIDTH: 261px"  value="$db_payinfo[open_address]"/></td>
				</tr>	
				<tr>
					<td align=right>帐户性质：</td>
					<td>
<!--
EOT;
	if(!isset($db_payinfo) || $db_payinfo[acc_type]==0){
		echo "<input type='radio' name='acc_type' id='acc_type' value='0' id='acc_type0' checked/><label id='acc_type0'>个人</label>";
	}else{
		echo "<input type='radio' name='acc_type' id='acc_type' value='0' id='acc_type0'/><label id='acc_type0'>个人</label>";	
	}
	if(isset($db_payinfo) && $db_payinfo[acc_type]==1){
		echo "<input type='radio' name='acc_type' id='acc_type' value='1' id='acc_type1' checked/><label id='acc_type1'>企业</label>";
	}else{
		echo "<input type='radio' name='acc_type' id='acc_type' value='1' id='acc_type1'/><label id='acc_type1'>企业</label>";	
	}	
print <<<EOT
-->
					
					</td>
				</tr>				
				<tr>
					<td colspan="2" align="center"><input name="btnSubmit" type="submit" id="btnSubmit" value=" 确定 " />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
					<input type="button" onclick="window.close();" value=" 取消 ">
					</td>
				</tr>
    </tbody>
 </table>
 </div></TD>
  </TR>
 </TBODY>

 </TABLE>
</form>
<script type="text/javascript">
	function checkfrm(){
		if(isEmpty($("pay_method").value)==true){
			alert('请选择支付方式！');
			$("pay_method").focus();
			return false;
		}		
		if(isEmpty($("account").value)==true){
			alert('开户帐号不能为空！');
			$("account").focus();
			return false;
		}
		if(isEmpty($("acc_contract").value)==true){
			alert('开户人姓名不能为空！');
			$("acc_contrace").focus();
			return false;
		}
	}
</script>
<!--
EOT;
}else if($action=="affsite"){
	$affcdate = date('Y/m/d H:i:s',$db_affsite[aff_create_time]);	
	$cdate = date('Y/m/d H:i:s',$db_affsite[create_time]);		
print <<<EOT
-->

<form action="$admin_file" method="get" name="form">
<center>
<TABLE cellSpacing="0" cellPadding="0" width="100%" border=0 ID="Table22">
	<TBODY>
		<TR>
			<TD align=left class="tittab" BACKGROUND="$imgpath/admin/menu_bg.gif"><strong><img src="$imgpath/admin/view.gif" width="15" height="13" align="absmiddle"> 站点详细资料</strong></TD>
		</TR>
	</TBODY>
</TABLE>
<br/>
						<table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
							<tr>
								<td bgcolor="#f6f6f6">所属站长：<span class="hong12"><strong>$db_affsite[aff_name]</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									真实姓名：<span class="hong12"><strong>$db_affsite[aff_real_name]</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									注册时间：<span class="hong12"><strong>$affcdate</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
								</td>
							 	<td align=right bgcolor="#f6f6f6">
							 		<a href="$backurl">返回上一页</a>&nbsp;
						 		</td>   
							</tr>
						</table>


			<table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
				<tr>
					<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#d0d0d0">
							<tr>
								<td align="center" bgcolor="#ffffff">
								    <table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr><td height="10"></td></tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="4">										
										<tr>
											<td height="25" align="right" width="15%"><nobr>站点名称：</nobr></td>
											<td align="left">&nbsp;$db_affsite[aff_real_name]</td>
											<td height="25" align="right" class="hei12b">创建时间：</td>
											<td width="45%">&nbsp;cdate</td>										
										</tr>
										<tr>
											<td height="25" align="right" class="hei12b">站点类型：</td>
											<td align="left">&nbsp;$db_affsite[sitetype]</td>																			
											<td height="25" align="right" >站点地址：</td>
											<td align="left">&nbsp;$db_affsite[url]</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td align="center" bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="4">
									    <tr>
											<td  height="25" align="right" width="15%"><nobr>标签：</nobr></td>
											<td align="left">&nbsp;$db_affsite[tags]</td>
											<td height="25" align="right" class="hei12b">关键字：</td>
											<td width="45%">&nbsp;$db_affsite[keyword]</td>
										</tr>
										<tr>
											<td height="25" align="right" class="hei12b">IP地址：</td>
											<td>&nbsp;$db_affsite[ip]</td>
										
											<td height="31" align="right" class="hei12b">ICP证号：</td>
											<td>&nbsp;$db_affsite[icp_code]</td>
										</tr>
										<tr>
											<td height="31" align="right" class="hei12b">日访问量：</td>
											<td>&nbsp;$db_affsite[day_pv]</td>
										
											<td height="31" align="right" class="hei12b">日独立IP：</td>
											<td>&nbsp;$db_affsite[day_ip]</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="4">
										<tr>
											<td height="10"></td>
										</tr>
										<tr>
											<td height="25" align="right" width="25%"><nobr>是否使用了广告代码：</nobr></td>
											<td >&nbsp;$db_affsite[ad_used]</td>
										
											<td height="25" align="right" width="25%">是否允许投放CPC：</td>
											<td>&nbsp;$db_affsite[enable_cpc]</td>
											
											<td height="25" align="right" width="30%">是否允许投放轮播：</td>
											<td>&nbsp;$db_affsite[enable_roll]</td>											
										</tr>
										<tr>
											<td height="10"></td>
										</tr>										
									</table>
								</td>
							</tr>							
							<tr>
								<td align="center" bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="4">
										<tr>
											<td width="15%" align="right" valign="top">备注说明：</td>
											<td align="left">&nbsp;$db_affsite[memo]</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td>&nbsp;</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
						</td>
						<td width="45%" valign="top">					
								<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#d0d0d0">
								 <tr><td bgcolor="#f6f6f6" height="25" colspan="5">
								 <table width="100%" border="0" cellpadding="0" cellspacing="0">
								 <tr><td><b>审批记录</b></td>
								 <td align=right>&nbsp;</td>
								 </tr>
								 </table>
						</td>
					</tr>
					<tr>
						<td align="center" bgcolor="#ffffff" class="hei12b" height="25px"><nobr>序号</nobr></td>
						<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核人</td>
						<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核时间</td>
						<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>说明</td>		
						<td width="60px" align="center" bgcolor="#ffffff" class="hei12b"><nobr>结果</td>								
					</tr>	
<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_auditlist); 
foreach($db_auditlist as $db_audit ){
		$curidx = $curidx+1;
		$curpageidx = $curpageidx+1;
		$cdate = date('m/d H:i',$db_audit[create_time]);
		$status = $cfg_userstatus[$db_audit[auditstatus]];
print <<<EOT
-->      
										<tr>
											<td height="25" align="center" bgcolor="#ffffff">$curidx</td>										
											<td height="25" align="center" bgcolor="#ffffff"><nobr>$db_audit[audit_name]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$cdate</nobr></td>
											<td bgcolor="#ffffff" align="center" class="lanh12"><nobr>$db_audit[content]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$status</nobr></td>
										</tr>
<!--
EOT;
}print <<<EOT
-->															  
						 	</table>	
					</td>
				</tr>
			</table>
</center>
</form>

<!--
EOT;
}else if($action=="merchant"){
	$cdate = date('Y/m/d H:i:s',$db_merchant[create_time]);	
	$db_status = $cfg_userstatus[$db_merchant[status]];	
	$db_clienttype = $cfg_merclienttype[$db_merchant[client_type]];
print <<<EOT
-->

<form name="form" method="post" action="$admin_file" id="form" onsubmit="return checkfrm();" >
<TABLE cellSpacing="0" cellPadding="0" width="100%" border=0 ID="Table22">
	<TBODY>
		<TR>
			<TD align=left class="tittab" BACKGROUND="$imgpath/admin/menu_bg.gif"><strong><img src="$imgpath/admin/view.gif" width="15" height="13" align="absmiddle"> 广告主详细资料</strong></TD>
		</TR>
	</TBODY>
</TABLE>
<br/>
						<table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
							<tr>
								<td bgcolor="#f6f6f6">登录名：<span class="hong12"><strong>$db_merchant[login_name]</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									注册时间：<span class="hong12"><strong>$cdate</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									状态：<span class="hong12"><strong>$db_status</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									</td>
							 <td align=right bgcolor="#f6f6f6">&nbsp;
							 <a href="$backurl">返回上一页</a>&nbsp;
							 </td>   									
							</tr>
						</table>


<table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
				<tr>
					<td width="57%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#d0d0d0">
							<tr>
								<td align="center" bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="2">
										<tr>
										<td align="right" class="hei12b" width="80">广告主LOGO：</td>
										<td>
<!--
EOT;
	if(isset($db_merchant) && $db_merchant[logo]){
		echo "<a href='".$db_merchant[logo]."' target='_blank'><img src='".$db_merchant[logo]."' border='0' height='60px' align='absmiddle' title='点击看原图'/></a>";
	}
print <<<EOT
-->									</td>
											<td height="30" align="right" class="hei12b" width="80">开票台头：</td>
											<td align="left" colspan="3">$db_merchant[ticket_title]</td>
										</tr>
										<tr>
											<td height="30" align="right" class="hei12b" width="80">公司名称：</td>
											<td align="left">$db_merchant[company]</td>
											<td align="right" class="hei12b" width="80">客户来源：</td>
											<td align="left">$db_merchant[client_source]</td>													
										</tr>
										<tr>
											<td height="30" align="right" class="hei12b" width="80">人员规模：</td>
											<td align="left">$db_merchant[scale]</td>
											<td align="right" class="hei12b" width="80">营业执照：</td>
											<td align="left">$db_merchant[biz_code]</td>													
										</tr>
										<tr>
											<td height="30" align="right" class="hei12b" width="80">主营行业：</td>
											<td align="left">$db_merchant[trade]</td>
											<td align="right" class="hei12b" width="80">客户类型：</td>
											<td align="left">$db_clienttype</td>													
										</tr>
										<tr>
											<td height="30" align="right" class="hei12b" width="80">客户简称：</td>
											<td align="left">$db_merchant[short_name]</td>
											<td align="right" class="hei12b" width="80">客户级别：</td>
											<td align="left">$db_merchant[client_level]</td>											
										</tr>
										<tr>
											<td height="30" align="right" class="hei12b" width="80">信誉度：</td>
											<td align="left" width="155">$db_merchant[credit]</td>
											<td align="right" class="hei12b" width="80">销售人员：</td>
											<td align="left">$db_merchant[seller_name]</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td align="center" bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="4">
										<tr>
											<td width="80" height="30" align="right" class="hei12b">省市地区：</td>
											<td width="155" align="left">$db_merchant[province_name]-$db_merchant[city_name]</td>
											<td width="80" align="right" class="hei12b"><nobr>邮政编码：</nobr></td>
											<td align="left">$db_merchant[zip]</td>
										</tr>
										<tr>
											<td width="80" align="right" class="hei12b">联系地址：</td>
											<td width="155" align="left">&nbsp;$db_merchant[address]</td>
											<td width="80"" align="right" class="hei12b">企业网址：</td>
											<td align="left">$db_merchant[url]</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td bgcolor="#ffffff">
									<table width="100%" border="0" cellspacing="0" cellpadding="4">
										<tr>
											<td height="10"></td>
										</tr>									
										<tr>
											<td width="80" align="right" class="hei12b">初次充值：</td>
											<td width="155" align="left">&nbsp;$db_merchant[init_store]</td>
											<td width="80"" align="right" class="hei12b">账户余额：</td>
											<td align="left">$db_merchant[current_store]</td>
										</tr>
										<tr>
											<td width="80" align="right" class="hei12b">提醒额度：</td>
											<td align="left">&nbsp;$db_merchant[deposit]</td>
											<td width="80"" align="right" class="hei12b">可透支额度：</td>
											<td align="left">$db_merchant[over_draft]</td>
										</tr>
										<tr>
											<td height="10"></td>
										</tr>										
									</table>
								</td>
							</tr>							
							<tr>
								<td align="center" bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td height="10"></td>
										</tr>
									</table>
									<table width="98%" border="0" cellspacing="0" cellpadding="4">
										<tr>
											<td width="72" align="right" valign="top" class="hei12b">备注说明：</td>
											<td align="left">$db_merchant[memo]</td>
										</tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td>&nbsp;</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
					<td width="43%" valign="top">
							<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#d0d0d0">
								 <tr><td bgcolor="#f6f6f6" height="25" colspan="5">
								 <table width="100%" border="0" cellpadding="0" cellspacing="0">
								 <tr><td><b>广告计划</b></td>
								 </tr>
								 </table>
								 </td>
								 </tr>
								<tr>
									<td width="30%" height="30" align="center" bgcolor="#ffffff" class="hei12b"><nobr>广告计划</td>
									<td width="20%" align="center" bgcolor="#ffffff" class="hei12b"><nobr>开始日期</td>
									<td width="20%" align="center" bgcolor="#ffffff" class="hei12b"><nobr>结束日期</td>									
									<td width="16%" align="center" bgcolor="#ffffff" class="hei12b"><nobr>状态</td>
									<td width="16%" align="center" bgcolor="#ffffff" class="hei12b"><nobr>添加日期</td>
								</tr>
<!--
EOT;
$showcount = count($db_advlist); 
foreach($db_advlist as $db_adv ){
	$sdate = date('y/m/d',$db_adv[start_time]);
	$edate = date('y/m/d',$db_adv[end_time]);
	$cdate = date('y/m/d',$db_adv[create_time]);
	$db_status = $cfg_userstatus[$db_adv[status]];
print <<<EOT
-->     
										<tr>
											<td height="30" align="center" bgcolor="#ffffff">$db_adv[name]</td>
											<td bgcolor="#ffffff" class="lanh12" align="center"><nobr>$sdate</td>
											<td bgcolor="#ffffff" class="lanh12" align="center"><nobr>$edate</td>											
											<td bgcolor="#ffffff" align="center"><nobr>$db_status</td>
											<td bgcolor="#ffffff" class="lanh12"><nobr>$cdate</td>
										</tr>
<!--
EOT;
}
print <<<EOT
--> 
							</table>
							<br/>							
							<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#d0d0d0">
								 <tr><td bgcolor="#f6f6f6" height="25" colspan="5">
								 <table width="100%" border="0" cellpadding="0" cellspacing="0">
								 <tr><td><b>审批记录</b></td>
								 <td align=right>&nbsp;</td>
								 </tr>
								 </table>
						</td>
								</tr>
								<tr>
									<td align="center" bgcolor="#ffffff" class="hei12b" height="25px"><nobr>序号</nobr></td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核人</td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核时间</td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>说明</td>		
									<td width="60px" align="center" bgcolor="#ffffff" class="hei12b"><nobr>结果</td>								
								</tr>	
<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_auditlist); 
foreach($db_auditlist as $db_audit ){
		$curidx = $curidx+1;
		$curpageidx = $curpageidx+1;
		$cdate = date('m/d H:i',$db_audit[create_time]);
		$status = $cfg_userstatus[$db_audit[auditstatus]];
print <<<EOT
-->      
										<tr>
											<td height="25" align="center" bgcolor="#ffffff">$curidx</td>										
											<td height="25" align="center" bgcolor="#ffffff"><nobr>$db_audit[audit_name]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$cdate</nobr></td>
											<td bgcolor="#ffffff" align="center" class="lanh12"><nobr>$db_audit[content]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$status</nobr></td>
										</tr>
<!--
EOT;
}print <<<EOT
-->															  
						 	</table>							
							<br>
						<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#d0d0d0">
							<tr>
								<td bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="4">
										<tr>
											<td width="22%" height="30" align="right"><span>默认联系人：</span></td>
											<td width="25%">$db_defaultman[name]</td>
											<td height="30" align="right"><span class="hei12b">联系人职务：</span></td>
											<td width="30%">$db_defaultman[title]</td>
										</tr>
										<tr>
											<td height="30" align="right" class="hei12b">负责业务：</td>
											<td>$db_defaultman[function]</td>
											<td height="31" align="right" class="hei12b">手机号码：</td>
											<td>$db_defaultman[mobile]</td>
										</tr>
										<tr>
											<td height="31" align="right" class="hei12b">电子邮件：</td>
											<td>$db_defaultman[email]</td>
											<td height="31" align="right" class="hei12b">MSN：</td>
											<td>$db_defaultman[msn]</td>
										</tr>
										<tr>
											<td height="31" align="right" class="hei12b">QQ号码：</td>
											<td>$db_defaultman[qq]</td>
											<td height="23" align="right" class="hei12b">办公电话：</td>
											<td>$db_defaultman[work_tel]</td>
										</tr>										
									</table>
									<br>
								</td>
							</tr>

						</table>
					</td>
				</tr>
			</table>
</form>
<!--
EOT;
}else if($action=="advertise"){
	$adv_id = $curid;
	$cdate = date('Y/m/d H:i:s',$db_adv[create_time]);
	$sdate = date('Y-m-d H',$db_adv[start_time]);
	$edate = date('Y-m-d H',$db_adv[end_time]);	
	($db_adv[log_uptime]>0) && $ltime =  date('Y-m-d H:i:s',$db_adv[log_uptime]);
	$feetype = $cfg_advfeetype[$db_adv[fee_type]];
	$advaudit = $cfg_userstatus[$db_adv[audit]];	
	if(isset($db_adv) && $db_adv[is_view]==1){
		$is_view = '记录显示&nbsp;';
	}else{
		$is_view = '不记录显示&nbsp;';
	}
	if(isset($db_adv) && $db_adv[is_click]==1){
		$is_click = '记录点击&nbsp;';
	}else{
		$is_click = '不记录点击&nbsp;';
	}
	if(isset($db_adv) && $db_adv[is_rolling]==1){
		$is_rolling = '参与轮播&nbsp;';
	}else{
		$is_rolling = '不参与轮播&nbsp;';
	}
	if(isset($db_adv) && $db_adv[mer_onlyfee]==1){
		$mer_onlyfee = '是&nbsp;';
	}else{
		$mer_onlyfee = '否&nbsp;';	
	}	
print <<<EOT
-->
<form action="$admin_file" method="get" name="form">

<TABLE cellSpacing="0" cellPadding="0" width="100%" border=0 ID="Table22">
	<TBODY>
		<TR>
			<TD align=left class="tittab" BACKGROUND="$imgpath/admin/menu_bg.gif"><strong><img src="$imgpath/admin/view.gif" width="15" height="13" align="absmiddle"> 广告计划详细信息</strong></TD>
		</TR>
	</TBODY>
</TABLE>
				<table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				<tr>
					<td height="10"></td>
				</tr>
			</table>
						<table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
							<tr>
								<td bgcolor="#f6f6f6">
									计划名称：<span class="hong12"><strong>$db_adv[name]</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
								    每日限额：<span class="hong12"><strong>$db_adv[day_maxmoney]</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									创建时间：<span class="hong12"><strong>$cdate</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									审核状态：<span class="hong12"><strong>$advaudit</strong></span>&nbsp;&nbsp;&nbsp;&nbsp; 
									</td>
							 <td align=right bgcolor="#f6f6f6">&nbsp;
							 <a href="$backurl">返回上一页</a>&nbsp;
							 </td>   									
							</tr>
						</table>
				<table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				<tr>
					<td height="10"></td>
				</tr>
			</table>
			
	<table width="98%"><tr><td width="50%" valign="top">
			<table cellSpacing="1" cellPadding="5" width="100%" align="center" bgColor="#cccccc" border="0">
				<tr>
					<td width="34%" bgColor="#ffffff"><strong>活动Logo：</strong>
<!--
EOT;
	if(isset($db_adv) && $db_adv[logo]){
		echo "<a href='".$db_adv[logo]."' target='_blank'><img src='".$db_adv[logo]."' border='0' height='60px' align='absmiddle' title='点击看原图'/></a>";
	}
print <<<EOT
-->
					</td>
					<td width="32%" bgColor="#ffffff"><strong>支付标准：</strong>$feetype</td>
				</tr>
				<tr>
					<td bgColor="#ffffff"><strong>所属客户：</strong>$db_adv[mer_name]</td>
					<td bgColor="#ffffff">
						<strong>计划类型：</strong>$db_adv[advtype]
					</td>
				</tr>	
				<tr>
					<td bgColor="#ffffff"><strong>投放期限：</strong>$sdate - $edate
					</td>
					<td bgColor="#ffffff"><strong>对账URL：</strong>$db_adv[bill_url]
					</td>
				</tr>
				<tr>
					<td bgColor="#ffffff"><strong>广告主结算价：</strong>$db_adv[price]$db_adv[unit]
					</td>
					<td bgColor="#ffffff"><strong>站长计费单价：</strong>$db_adv[aff_price]$db_adv[aff_unit]
					</td>
				</tr>
			</table>
			
			</td>
			
			<td width="50%" valign="top">
							<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#d0d0d0">
								 <tr><td bgcolor="#f6f6f6" height="25" colspan="5">
								 <table width="100%" border="0" cellpadding="0" cellspacing="0">
								 <tr><td><b>审批记录</b></td>
								 <td align=right>&nbsp;</td>
								 </tr>
								 </table>
						</td>
								</tr>
								<tr>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>序号</nobr></td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核人</td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核时间</td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>说明</td>		
									<td width="60px" align="center" bgcolor="#ffffff" class="hei12b"><nobr>结果</td>								
								</tr>	
<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_auditlist); 
foreach($db_auditlist as $db_audit ){
		$curidx = $curidx+1;
		$curpageidx = $curpageidx+1;
		$cdate = date('m/d H:i',$db_audit[create_time]);
		$status = $cfg_userstatus[$db_audit[auditstatus]];
print <<<EOT
-->      
										<tr>
											<td height="25" align="center" bgcolor="#ffffff">$curidx</td>										
											<td height="25" align="center" bgcolor="#ffffff"><nobr>$db_audit[audit_name]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$cdate</nobr></td>
											<td bgcolor="#ffffff" align="center" class="lanh12"><nobr>$db_audit[content]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$status</nobr></td>
										</tr>
<!--
EOT;
}print <<<EOT
-->															  
						 	</table>	
			</td>
			</tr></table>

			<table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				<tr>
					<td height="10"></td>
				</tr>
			</table>
			<table cellSpacing="0" cellPadding="5" width="98%" align="center" border="0">
				<tr>
					<td width="80%" bgColor="#E1EBE2"><STRONG>定向设置</STRONG></td>
					<td align=right bgcolor="#E1EBE2">&nbsp;
<!--
EOT;
	if($canadd==true){
		showButton(1,'新增定向设置','javascript:showModelWin("'.$admin_file.'&action=newadvselector&adv_id='.$curid.$transtr.'");');
	}
print <<<EOT
-->					
					&nbsp;</td>   								
				</tr>
			</table>
			<table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#d0d0d0">
				<tr>
					<td width="12%" height="25" align="center" bgcolor="#efefef" class="hei12b"><nobr>定向方式</td>
					<td width="15%" align="center" bgcolor="#efefef" class="hei12b"><nobr>定向类型</td>
					<td align="center" bgcolor="#efefef" class="hei12b"><nobr>内容</td>
					<td width="15%" align="center" bgcolor="#efefef" class="hei12b"><nobr>添加日期</td>
					<td width="8%" align="center" bgcolor="#efefef" class="hei12b"><nobr>状态</td>
					<td width="50px" align="center" bgcolor="#efefef" class="hei12b"><nobr>删除</td>					
				</tr>
<!--
EOT;
foreach($db_advselectorlist as $db_advselector ){
	$cdate = date('Y/m/d H:i:s',$db_advselector[create_time]);
	$status = $cfg_advselectorstatus[$db_advselector[status]];
	$itype = $cfg_advselectortype[$db_advselector[itype]];
	$filter = $cfg_advselectorfilter[$db_advselector[is_filter]];
print <<<EOT
-->     
										<tr>
											<td height="25" align="center" bgcolor="#ffffff">$filter</td>
											<td height="25" align="center" bgcolor="#ffffff">$itype</td>
											<td height="25" align="center" bgcolor="#ffffff">$db_advselector[content]</td>									
											<td height="25" align="center" bgcolor="#ffffff">$cdate</td>
											<td height="25" align="center" bgcolor="#ffffff">$status</td>
											<td height="25" align="center" bgcolor="#ffffff">
<!--
EOT;
	showDelButton($db_advselector[id],'deladvselector');
print <<<EOT
-->											
											</td>											
										</tr>
<!--
EOT;
}
print <<<EOT
--> 
			</table>			
			<table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				<tr>
					<td height="10"></td>
				</tr>
			</table>
			<div id="divFilter"></div>
			<table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				<tr>
					<td height="10"></td>
				</tr>
			</table>
			<table cellSpacing="0" cellPadding="5" width="98%" align="center" border="0">
				<tr>
					<td class="zhuang12b" width="100%" bgColor="#E1EBE2"><b>统计设置</b></td>
				</tr>
			</table>

			<table cellSpacing="1" cellPadding="5" width="98%" align="center" bgColor="#cccccc" border="0">
				<tr>
					<td width="12%" bgColor="#ffffff"><b>显示计数：</b></td>
					<td bgColor="#ffffff">$is_view</td>
					<td width="12%" bgColor="#ffffff" align="right"><b>点击计数：</b></td>
					<td bgColor="#ffffff">$is_click</td>
					<td width="12%" bgColor="#ffffff" align="right"><b>参与轮播：</b></td>
					<td bgColor="#ffffff">$is_rolling</td>
					<td width="12%" bgColor="#ffffff" align="right"><b>服务商计费：</b></td>
					<td bgColor="#ffffff">$mer_onlyfee</td>					
				</tr>
				<tr>
					<td class="p2" bgColor="#ffffff" colSpan="8"><b>防止作弊：</b>
<!--
EOT;
	if(isset($db_adv) && $db_adv[filter_likeip]==1){
		echo '过滤相似IP&nbsp;';
	}else{
		echo '不过滤相似IP&nbsp;';
	}
	if(isset($db_adv) && $db_adv[filter_agentip]==1){
		echo '过滤代理IP&nbsp;';
	}else{
		echo '不过滤代理IP&nbsp;';
	}
	if(isset($db_adv) && $db_adv[filter_foreignip]==1){
		echo '过滤国外IP&nbsp;';
	}else{
		echo '不过滤国外IP&nbsp;';
	}
print <<<EOT
-->&nbsp;点击率上限$db_adv[max_crt]%
					</td>
				</tr>
			</table>
				<table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				<tr>
					<td height="10"></td>
				</tr>
			</table>			
			<table cellSpacing="0" cellPadding="5" width="98%" align="center" border="0">
				<tr>
					<td class="zhuang12b" width="100%" bgColor="#E1EBE2"><b>运营状态</b></td>
				</tr>
			</table>		
			<table cellSpacing="1" cellPadding="5" width="98%" align="center" bgColor="#cccccc" border="0">
			<tr>
					<td bgColor="#ffffff"><strong>创意数量：</strong>$db_adv[creative_count]
					</td>
					<td bgColor="#ffffff"><strong>申请数量：</strong>$db_adv[aff_count]
					</td>
					<td bgColor="#ffffff"><strong>站点数量：</strong>$db_adv[site_count]
					</td>	
					<td bgColor="#ffffff"><strong>广告位数量：</strong>$db_adv[adpalce_count]
					</td>												
				</tr>	
			<tr>
					<td bgColor="#ffffff"><strong>日志表使用：</strong>$db_adv[log_flag]
					</td>
					<td bgColor="#ffffff"><strong>显示日志表状态：</strong>
<!--
EOT;
	if($db_adv[is_view]==1 && $db_adv[log_v_created]==0) echo "无,需要生成 ";
	if($db_adv[is_view]==1 && $db_adv[log_v_created]==1) echo "<font color='green'>有,无需生成</font>";
	if($db_adv[is_view]==0) echo "<font color='blue'>无需生成</font>";	
print <<<EOT
--> 
					</td>
					<td bgColor="#ffffff"><strong>点击日志表状态：</strong>
<!--
EOT;
	if($db_adv[is_view]==1 && $db_adv[log_c_created]==0) echo "无,需要生成 ";
	if($db_adv[is_view]==1 && $db_adv[log_c_created]==1) echo "<font color='green'>有,无需生成</font>";
	if($db_adv[is_view]==0) echo "<font color='blue'>无需生成</font>";	
print <<<EOT
-->
					</td>
					<td bgColor="#ffffff"><strong>日志表最后切换时间：</strong>$ltime
					</td>					
				</tr>					
				</table>			
</form>
<br/>
<!--
EOT;
}else if($action=="newadvselector" || $action=="editadvselector"){
print <<<EOT
-->

<form name="form" method="post" action="$basename" id="form" onsubmit="return checkfrm();" >
<input type="hidden" name="job" id="job" value="$job" />
<input type="hidden" name="adv_id" id="adv_id" value="$adv_id" />
<input type="hidden" name="action" id="action" value="saveadvselector" />
<input type="hidden" name="sel_province" id="sel_province" value="" />
<input type="hidden" name="sel_sitetype" id="sel_sitetype" value="" />
<input type="hidden" name="sel_domain" id="sel_domain" value="" />
<TABLE cellSpacing="0" cellPadding="0" width="100%" border=0 ID="Table22">
	<TBODY>
		<TR >
			<TD class="tittab" BACKGROUND="$imgpath/admin/menu_bg.gif"><strong><img src="$imgpath/admin/view.gif" width="15" height="13" align="absmiddle"> 新增　定向设置信息</strong></TD>
		</TR>
	</TBODY>
</TABLE>
<table cellspacing=0 cellpadding=0 width="100%" border=0 id="Table23">  
    <tbody>
      <tr>
        <td valign=top>
		<div class="addpro">
		<table cellspacing=0 cellpadding=4 width="100%" border=0 align=center id="Table24">
        <tbody>
				<tr>
					<td colspan="2" align="right"><input name="btnSubmit" type="submit" id="btnSubmit" value=" 保存>> "  style="background-color:#ffffff;border;0px"/>&nbsp;<input type="button" onclick="window.close();" value=" 取消 " style="background-color:#ffffff;border;0px"/>
					</td>
				</tr>        
				<tr>
					<td align=right width="28%">定向方式(<font color=red>*</font>)：</td>
					<td>
						<input type="radio" name="is_filter" id="is_filter0"  value='0' checked/>选取
						<input type="radio" name="is_filter" id="is_filter1"  value='1'/>过滤					
					</td>
				</tr>
				<tr>
					<td align=right>定向类型(<font color=red>*</font>)：</td>
					<td>
						<input type="radio" name="itype" id="itype0"  value='site_type' onclick="javascript:showSiteTypeList();" checked/><label for="itype0">站长类型</label>
						<input type="radio" name="itype" id="itype1"  value='province' onclick="javscript:showProvinceList();"/><label for="itype1">省份</label>			
						<input type="radio" name="itype" id="itype3"  value='domain' onclick="javascript:showDomainList();"/><label for="itype3">域名</label>
						<input type="radio" name="itype" id="itype4"  value='keyword' onclick="javascript:showHidden();"/><label for="itype4">关键字</label>
					</td>
				</tr>
				<tr id="divprovince" style="display:none">
					<td align="right">请选择省份(<font color=red>*</font>)：</td>
					<td>
						<table>
<!--
EOT;
						$i=0;
						foreach($db_provincelist as $db_province ){
							if($i%7==0){
								echo "<tr>";
							}
print <<<EOT
--> 
						<td><input type="checkbox" id="province" name="province"  value="$db_province[name]" onclick="selProvince();"/></td><td noWrap>$db_province[name]</td>
<!--
EOT;
							if($i%7==6){
								echo "</tr>";
							}
							$i++;
						}
print <<<EOT
--> 
						</table>
					</td>
				</tr>									
				<tr id="divsitetype">
					<td align="right">请选择站点类型(<font color=red>*</font>)：</td>
					<td>
						<table border="0" cellpadding="0" cellspacing="0">
<!--
EOT;
						$i=0;
						foreach($db_sitetypelist as $db_sitetype ){
							if($i%5==0){
								echo "<tr>";
							}
print <<<EOT
--> 
						<td><input type="checkbox" id="sitetype" name="sitetype"  value="$db_sitetype[val]" onclick="selSitetype();"/></td><td noWrap>$db_sitetype[val]</td>
<!--
EOT;
							if($i%5==4){
								echo "</tr>";
							}
							$i++;
						}
print <<<EOT
--> 
						</table>
					</td>
				</tr>
				<tr id="divdomain" style="display:none">
					<td align="right">请选择域名类型(<font color=red>*</font>)：</td>
					<td>
						<table border="0" cellpadding="0" cellspacing="0">
						<tr>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".com" onclick="selDomain();"/></td><td noWrap>.com</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".cn" onclick="selDomain();"/></td><td noWrap>.cn</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".mobi" onclick="selDomain();"/></td><td noWrap>.mobi</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".net" onclick="selDomain();"/></td><td noWrap>.net</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".org" onclick="selDomain();"/></td><td noWrap>.org</td>
						</tr>
						<tr>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".com.cn" onclick="selDomain();"/></td><td noWrap>.com.cn</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".net.cn" onclick="selDomain();"/></td><td noWrap>.net.cn</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".org.cn" onclick="selDomain();"/></td><td noWrap>.org.cn</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".gov.cn" onclick="selDomain();"/></td><td noWrap>.gov.cn</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".hk" onclick="selDomain();"/></td><td noWrap>.hk</td>
						</tr>
						<tr>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".tv" onclick="selDomain();"/></td><td noWrap>.tv</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".biz" onclick="selDomain();"/></td><td noWrap>.biz</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".cc" onclick="selDomain();"/></td><td noWrap>.cc</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".name" onclick="selDomain();"/></td><td noWrap>.name</td>
						<td><input type="checkbox" id="domaintype" name="domaintype"  value=".info" onclick="selDomain();"/></td><td noWrap>.info</td>
						</tr>						
						</table>
					</td>
				</tr>				
				<tr id="divcontent" style="display:none">
					<td align=right>定向内容(<font color=red>*</font>)：</td>
					<td>
						<textarea id="content" name="content" style="width:240px;height:50px"></textarea>
					</td>
				</tr>				
				<tr>
					<td align=right>状态(<font color=red>*</font>)：</td>
					<td>
						<input type="radio" name="status" id="status1"  value='1' checked/>启用						
						<input type="radio" name="status" id="status0"  value='0'/>停止
					</td>
				</tr>
    </tbody>
 </table>
 </div></TD>
  </TR>
 </TBODY>

 </TABLE>
</form>

<script type="text/javascript">
	function checkfrm(){
		var bflag = false;
		if(document.form.itype[0].checked){
			for(var i=0;i<document.form.sitetype.length;i++){
				if(document.form.sitetype[i].checked){
					bflag = true;
					break;
				}
			}
			if(bflag==false){
				alert('请选择站点类型！');
				return false;
			}
		}		
		if(document.form.itype[1].checked){
			for(var i=0;i<document.form.province.length;i++){
				if(document.form.province[i].checked){
					bflag = true;
					break;
				}
			}
			if(bflag==false){
				alert('请选择省份！');
				return false;
			}
		}
		if(document.form.itype[2].checked){
			for(var i=0;i<document.form.domaintype.length;i++){
				if(document.form.domaintype[i].checked){
					bflag = true;
					break;
				}
			}
			if(bflag==false){
				alert('请选择域名类型！');
				return false;
			}
		}		
		if(document.form.itype[3].checked){
			if(isEmpty($("content").value)==true){
				alert('请输入内容！');
				return false;
			}
		}
		return true;
	}
	function showProvinceList(){
		$('divprovince').style.display="block";
		$('divsitetype').style.display="none";	
		$('divcontent').style.display="none";	
		$('divdomain').style.display="none";					
	}
	function showSiteTypeList(){
		$('divprovince').style.display="none";		
		$('divsitetype').style.display="block";		
		$('divcontent').style.display="none";	
		$('divdomain').style.display="none";	
	}
	function showDomainList(){
		$('divprovince').style.display="none";		
		$('divsitetype').style.display="none";
		$('divdomain').style.display="block";
		$('divcontent').style.display="none";		
	}	
	function showHidden(){
		$('divprovince').style.display="none";		
		$('divsitetype').style.display="none";	
		$('divcontent').style.display="block";	
		$('divdomain').style.display="none";										
	}
	function selDomain(){
		$("sel_domain").value = "";
		for(var i=0;i<document.form.domaintype.length;i++){
			if(document.form.domaintype[i].checked==true){
				$("sel_domain").value+=document.form.domaintype[i].value+",";
			}
		}
	}
	function selProvince(){
		$("sel_province").value = "";
		for(var i=0;i<document.form.province.length;i++){
			if(document.form.province[i].checked==true){
				$("sel_province").value+=document.form.province[i].value+",";
			}
		}
	}	
	function selSitetype(){
		$("sel_sitetype").value = "";
		for(var i=0;i<document.form.sitetype.length;i++){
			if(document.form.sitetype[i].checked){
				$("sel_sitetype").value+=document.form.sitetype[i].value+",";
			}
		}
	}	
</script>
<!--
EOT;
}else if($action=="advapply"){
	if($db_advapply[create_time]>0) $cdate = date('Y/m/d H:i:s',$db_advapply[create_time]);
	if(isset($db_adv)){
		$start_time = date('Y-m-d',$db_adv[start_time]);
		$end_time = date('Y-m-d',$db_adv[end_time]);
	}	
print <<<EOT
-->

<form action="$admin_file" method="get" name="form">
<center>
<TABLE cellSpacing="0" cellPadding="0" width="100%" border=0 ID="Table22">
	<TBODY>
		<TR>
			<TD align=left class="tittab" BACKGROUND="$imgpath/admin/menu_bg.gif"><strong><img src="$imgpath/admin/view.gif" width="15" height="13" align="absmiddle"> 站点详细资料</strong></TD>
		</TR>
	</TBODY>
</TABLE>
						<table width="98%" border="0" align="center" cellpadding="2" cellspacing="0">
						<tr><td height=4></td></tr>
							<tr>
							 	<td align=right bgcolor="#f6f6f6" height="30px">
							 		<a href="$backurl">返回上一页</a>&nbsp;
						 		</td>   
							</tr>
						</table>


			<table width="70%" border="0" align="center" cellpadding="5" cellspacing="0">
				<tr>
					<td valign="top">
						<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#d0d0d0">
							<tr>
								<td align="center" bgcolor="#ffffff">
								    <table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr><td height="10"></td></tr>
									</table>
									<table width="100%" border="0" cellspacing="0" cellpadding="4">										
										<tr>
											<td height="25" align="right" width="15%"><nobr>申请站长：</nobr></td>
											<td align="left">&nbsp;$db_aff[login_name]($db_aff[linkman])</td>
											<td height="25" align="right" class="hei12b">申请时间：</td>
											<td width="45%">&nbsp;$cdate</td>										
										</tr>
										<tr>
											<td height="25" align="right" class="hei12b">申请广告：</td>
											<td align="left">&nbsp;$db_adv[name]</td>																			
											<td height="25" align="right" >广告运营时间：</td>
											<td align="left">&nbsp;$start_time 至 $end_time</td>
										</tr>
									    <tr>
											<td  height="30" align="right" width="15%"><nobr>允许投放站点：</nobr></td>
											<td align="left" colspan="3">&nbsp;$showsite</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
							<td align="center" valign="middle">
								<table width="99%">
								<tr>
									<td>					
											<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#d0d0d0">
											 <tr><td bgcolor="#f6f6f6" height="25" colspan="5">
											 <table width="100%" border="0" cellpadding="0" cellspacing="0">
											 <tr><td><b>审批记录</b></td>
											 <td align=right>&nbsp;</td>
											 </tr>
											 </table>
									</td>
								</tr>
								<tr>
									<td align="center" bgcolor="#ffffff" class="hei12b" height="25px"><nobr>序号</nobr></td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核人</td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>审核时间</td>
									<td align="center" bgcolor="#ffffff" class="hei12b"><nobr>说明</td>		
									<td width="60px" align="center" bgcolor="#ffffff" class="hei12b"><nobr>结果</td>								
								</tr>	
<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_auditlist); 
foreach($db_auditlist as $db_audit ){
		$curidx = $curidx+1;
		$curpageidx = $curpageidx+1;
		$cdate = date('m/d H:i',$db_audit[create_time]);
		$status = $cfg_userstatus[$db_audit[auditstatus]];
print <<<EOT
-->      
										<tr>
											<td height="25" align="center" bgcolor="#ffffff">$curidx</td>										
											<td height="25" align="center" bgcolor="#ffffff"><nobr>$db_audit[audit_name]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$cdate</nobr></td>
											<td bgcolor="#ffffff" align="center" class="lanh12"><nobr>$db_audit[content]</nobr></td>
											<td bgcolor="#ffffff" align="center"><nobr>$status</nobr></td>
										</tr>
<!--
EOT;
}print <<<EOT
-->																				
								</table>
								</td>
							</tr>
						</table>
						</td>
			</table>

</td>
</tr>
</table>
</center>
</form>

<!--
EOT;
}?>-->